import { IsNotEmpty, IsString, IsOptional, IsNumber, IsBoolean } from 'class-validator';

export class CreateMessageDto {
  @IsNotEmpty({ message: '消息内容不能为空' })
  @IsString({ message: '消息内容必须是字符串' })
  content: string;

  @IsOptional()
  @IsNumber({}, { message: '接收者ID必须是数字' })
  receiverId?: number;

  @IsOptional()
  @IsBoolean({ message: 'isAIMessage必须是布尔值' })
  isAIMessage?: boolean;
}